﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RibbonApp.控件Samples
{
    public partial class AlertControlForm : Form
    {
        public AlertControlForm()
        {
            InitializeComponent();
        }

        private void alertControl1_BeforeFormShow(object sender, DevExpress.XtraBars.Alerter.AlertFormEventArgs e)
        {
            e.AlertForm.OpacityLevel = 1;
        }

        private void alertControl1_ButtonClick(object sender, DevExpress.XtraBars.Alerter.AlertButtonClickEventArgs e)
        {
            if (e.ButtonName == "alertButton1")
            {
            }
            
        }

        private void alertControl1_ButtonDownChanged(object sender, DevExpress.XtraBars.Alerter.AlertButtonDownChangedEventArgs e)
        {
            if (e.ButtonName == "alertButton2")
            {
            }
        }

        private void btnShowAlertWindow_Click(object sender, EventArgs e)
        {
            DevExpress.XtraBars.Alerter.AlertInfo info = new DevExpress.XtraBars.Alerter.AlertInfo("标题", "这里是警示信息");
          
            alertControl1.Show(this,info);
           
        }

        private void alertControl1_AlertClick(object sender, DevExpress.XtraBars.Alerter.AlertClickEventArgs e)
        {
            MessageBox.Show(e.Info.Text);
        }
    }
}
